package com.yuyou.tas.service.api.lesson.service;

import com.yuyou.tas.service.api.feedback.vo.resp.FeedbackClassesVo;
import com.yuyou.tas.service.api.lesson.dto.LessonClassDTO;
import com.yuyou.tas.service.api.lesson.dto.LessonClassPage;
import com.yuyou.tas.service.api.lesson.dto.LessonClassPageDTO;
import com.yuyou.tas.service.api.lesson.dto.LessonClassSyncDTO;
import com.yuyou.tas.service.api.lesson.entity.LessonClass;
import com.yuyou.tas.service.api.lesson.entity.LessonClassUserRel;
import com.yuyou.tas.util.bean.Pagination;
import com.yuyou.tas.util.bean.ResBoolSimpleInfo;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(value = "tas-lesson-service")
@RequestMapping(value = "/lessonClassAPI")
public interface LessonClassAPI {

	
	@RequestMapping(value = "/sycnClasssByOId")
	ResBoolSimpleInfo<String> sycnClasssByOId(@RequestBody List<LessonClassSyncDTO> list)throws Exception;
	
	@RequestMapping(value = "/delByOrgan7OIds")
	ResBoolSimpleInfo<String> delByOrgan7OIds(@RequestParam("oIds") List<Long> oIds,@RequestParam("authOrganizationId") Long authOrganizationId)
			throws Exception;
	
	@RequestMapping(value = "/findByUserId")
	List<LessonClassUserRel> findByUserId(@RequestParam("userId") Long userId);

	@RequestMapping(value = "/findLessonClassByClassId")
	LessonClass findLessonClassByClassId(@RequestParam("classId")Long classId);

	@RequestMapping(value = "/findLessonClassDTOByClassId")
	LessonClassDTO findLessonClassDTOByClassId(@RequestParam("classId")Long classId);

	@RequestMapping(value = "/findLessonClassByClassIds")
	List<LessonClass> findLessonClassByClassIds(@RequestParam("lessonClassIds") List<Long> lessonClassIdList);

	@RequestMapping(value = "/updateLessonClassStatus")
	ResBoolSimpleInfo<String> updateLessonClassStatus();

	@RequestMapping(value = "/selectById")
	LessonClass selectById(@RequestParam("id") Long id);

	@RequestMapping(value = "/findLessonClassPageCount")
	int findLessonClassPageCount(Pagination<LessonClassPageDTO> p);

	@RequestMapping(value = "/findLessonClassPageList")
	List<LessonClassPageDTO> findLessonClassPageList(Pagination<LessonClassPageDTO> p);

	@RequestMapping(value = "/getStudentCountByClassId")
	Integer getStudentCountByClassId(@RequestParam("classId")Long classId);


	@RequestMapping(value = "/findLessonClassByTeacher")
	ResBoolSimpleInfo<LessonClassPage> findLessonClassByTeacher(@RequestParam("teacherId")Long teacherId,
											 @RequestParam("schoolId")Long schoolId,
											 @RequestParam("trimesterId")Long trimesterId,
											 @RequestParam("sectionId")Long sectionId,
											 @RequestParam("levelId")Long levelId,
											 @RequestParam("pageSize")Integer pageSize,
											 @RequestParam("pageIndex")Integer pageIndex);



	@RequestMapping(value = "/findFeedbackLessonClassByTeacher")
	ResBoolSimpleInfo<List<FeedbackClassesVo>> findFeedbackLessonClassByTeacher(@RequestParam("teacherId")Long teacherId,
																				@RequestParam("trimesterId")Long trimesterId);

	@RequestMapping(value = "/findByClassIdsAndClassStatus")
	List<LessonClass> findByClassIdsAndClassStatus(@RequestParam("classIds") List<Long> classIds, @RequestParam("classStatus") Integer classStatus);

}
